package com.ruoyi.web.controller;

import com.ruoyi.common.sms.entity.YytSmsCoupon;
import com.ruoyi.common.sms.service.YytSmsCouponService;
import com.ruoyi.utils.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
* <p>
    *  前端控制器
    * </p>
*
* @author MrPing
* @since 2022-05-31
*/
@RestController
@RequestMapping("coupon")
public class YytSmsCouponShopController{

    @Autowired
    private YytSmsCouponService yytSmsCouponService;

    /**
     * 根据店铺 id 获取优惠券
     * @param shopId
     * @return
     */
    @GetMapping("/getShopCouponList")
    public ResponseResult getShopCouponList(@RequestParam("id") String shopId){
        return ResponseResult.success(yytSmsCouponService.getShopSysCoupon(shopId));
    }

}
